Conditions | 1 |
Total Lines | 8 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { CommandHandler, EventPublisher, ICommandHandler } from '@nestjs/cqrs'; |
||
13 | |||
14 | async execute(command: TryAggregateRootCommand) { |
||
15 | const {message} = command; |
||
16 | const aggregator = this.publisher.mergeObjectContext( |
||
17 | new TestModel() |
||
18 | ); |
||
19 | aggregator.applyEvent(message); |
||
20 | aggregator.commit(); |
||
21 | } |
||
23 |